package com.iplant.wms.service.po.mfs;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.iplant.base.po.BasePO;
import com.iplant.base.po.enums.DBSchemas;
import com.iplant.base.utils.annotation.field.DBField;
import com.iplant.base.utils.annotation.condition.DBCondition;
import com.iplant.base.utils.annotation.join.DBJoin;
import com.iplant.base.utils.annotation.join.multi.DBJoinMulti;
import com.iplant.base.utils.annotation.po.DBBasePO;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 货架
 *
 * @author ShrisJava
 */
@DBBasePO(TableName = "wms_store_shelf", CheckName = {"Code", "StoreID,StoreRegionID,StoreAreaID,Name"},
        Schemas = DBSchemas.WMS, CodeAuto = true, CodePrefix = "HJ-",Cache = true)
public class WMSStoreShelf extends BasePO implements Serializable {
    private static final long serialVersionUID = 1L;

    @DBCondition(CompareType = DBCondition.DBCompareType.findInSet)
    @DBJoin(name = "FactoryIDList", tableName = "wms_store", tableAsName = "r2", Schemas = DBSchemas.WMS,
            MainTableField = "StoreID")
    public List<Integer> FactoryIDList = new ArrayList<>();


    @DBJoinMulti(Name = "Code", TableName = "fmc_factory", MainTableField = "FactoryIDList", Schemas = DBSchemas.Basic)
    public String FactoryCode = "";

    @DBJoinMulti(Name = "Name", TableName = "fmc_factory", MainTableField = "FactoryIDList", Schemas = DBSchemas.Basic)
    public String FactoryName = "";

    @DBCondition
    @DBField
    public int StoreID = 0;

    @DBCondition
    @DBJoin(name = "Code", tableName = "wms_store", tableAsName = "r2", Schemas = DBSchemas.WMS,
            MainTableField = "StoreID")
    public String StoreCode = "";

    @DBCondition(CompareType = DBCondition.DBCompareType.like)
    @DBJoin(name = "Name", tableName = "wms_store", tableAsName = "r2", Schemas = DBSchemas.WMS,
            MainTableField = "StoreID")
    public String StoreName = "";

    @DBCondition
    @DBField
    public int StoreRegionID = 0;

    @DBCondition
    @DBJoin(name = "Code", tableName = "wms_store_region", tableAsName = "r1", JoinIndex = 2, Schemas = DBSchemas.WMS,
            MainTableField = "StoreRegionID")
    public String StoreRegionCode = "";

    @DBCondition(CompareType = DBCondition.DBCompareType.like)
    @DBJoin(name = "Name", tableName = "wms_store_region", tableAsName = "r1", JoinIndex = 2, Schemas = DBSchemas.WMS,
            MainTableField = "StoreRegionID")
    public String StoreRegionName = "";


    @DBCondition
    @DBField
    public int StoreAreaID = 0;

    @DBCondition
    @DBJoin(name = "Code", tableName = "wms_store_area", tableAsName = "r3", JoinIndex = 2, Schemas = DBSchemas.WMS,
            MainTableField = "StoreAreaID")
    public String StoreAreaCode = "";

    @DBCondition(CompareType = DBCondition.DBCompareType.like)
    @DBJoin(name = "Name", tableName = "wms_store_area", tableAsName = "r3", JoinIndex = 2, Schemas = DBSchemas.WMS,
            MainTableField = "StoreAreaID")
    public String StoreAreaName = "";

    @DBCondition
    @DBField
    public int TypeID = 0;

    public String TypeName = "";

    @DBField
    public int RowNumber = 0;

    @DBField
    public int ColumnNumber = 0;

    @DBField
    public int DepthNumber = 0;


    /**
     * 体积限制
     */
    @DBField
    public int StationVolNumber = 0;

    /**
     * 重量限制
     */
    @DBField
    public int StationBearing = 0;

    /**
     * 箱数限制
     */
    @DBField
    public int StationBoxNumber = 0;

    /**
     * 最小包装的数量限制
     */
    @DBField
    public int StationMinPackingNumber = 0;

    /**
     * 托盘限制
     */
    @DBField
    public int StationTrayNumber = 0;


    /**
     * 库位长度
     */
    @DBField
    public double StationLength = 0;

    /**
     * 库位宽度
     */
    @DBField
    public double StationWidth = 0;

    /**
     * 库位高度
     */
    @DBField
    public double StationHeight = 0;


    @JsonProperty("FactoryIDList")
    public List<Integer> getFactoryIDList() {
        return FactoryIDList;
    }

    public void setFactoryIDList(List<Integer> factoryIDList) {
        FactoryIDList = factoryIDList;
    }

    @JsonProperty("FactoryCode")
    public String getFactoryCode() {
        return FactoryCode;
    }

    public void setFactoryCode(String factoryCode) {
        FactoryCode = factoryCode;
    }

    @JsonProperty("FactoryName")
    public String getFactoryName() {
        return FactoryName;
    }

    public void setFactoryName(String factoryName) {
        FactoryName = factoryName;
    }

    @JsonProperty("StoreID")
    public int getStoreID() {
        return StoreID;
    }

    public void setStoreID(int storeID) {
        StoreID = storeID;
    }

    @JsonProperty("StoreCode")
    public String getStoreCode() {
        return StoreCode;
    }

    public void setStoreCode(String storeCode) {
        StoreCode = storeCode;
    }

    @JsonProperty("StoreName")
    public String getStoreName() {
        return StoreName;
    }

    public void setStoreName(String storeName) {
        StoreName = storeName;
    }

    @JsonProperty("StoreRegionID")
    public int getStoreRegionID() {
        return StoreRegionID;
    }

    public void setStoreRegionID(int storeRegionID) {
        StoreRegionID = storeRegionID;
    }

    @JsonProperty("StoreRegionCode")
    public String getStoreRegionCode() {
        return StoreRegionCode;
    }

    public void setStoreRegionCode(String storeRegionCode) {
        StoreRegionCode = storeRegionCode;
    }

    @JsonProperty("StoreRegionName")
    public String getStoreRegionName() {
        return StoreRegionName;
    }

    public void setStoreRegionName(String storeRegionName) {
        StoreRegionName = storeRegionName;
    }

    @JsonProperty("StoreAreaID")
    public int getStoreAreaID() {
        return StoreAreaID;
    }

    public void setStoreAreaID(int storeAreaID) {
        StoreAreaID = storeAreaID;
    }

    @JsonProperty("StoreAreaCode")
    public String getStoreAreaCode() {
        return StoreAreaCode;
    }

    public void setStoreAreaCode(String storeAreaCode) {
        StoreAreaCode = storeAreaCode;
    }

    @JsonProperty("StoreAreaName")
    public String getStoreAreaName() {
        return StoreAreaName;
    }

    public void setStoreAreaName(String storeAreaName) {
        StoreAreaName = storeAreaName;
    }

    @JsonProperty("TypeID")
    public int getTypeID() {
        return TypeID;
    }

    public void setTypeID(int typeID) {
        TypeID = typeID;
    }

    @JsonProperty("TypeName")
    public String getTypeName() {
        return TypeName;
    }

    public void setTypeName(String typeName) {
        TypeName = typeName;
    }

    @JsonProperty("RowNumber")
    public int getRowNumber() {
        return RowNumber;
    }

    public void setRowNumber(int rowNumber) {
        RowNumber = rowNumber;
    }

    @JsonProperty("ColumnNumber")
    public int getColumnNumber() {
        return ColumnNumber;
    }

    public void setColumnNumber(int columnNumber) {
        ColumnNumber = columnNumber;
    }

    @JsonProperty("StationLength")
    public double getStationLength() {
        return StationLength;
    }

    public void setStationLength(double stationLength) {
        StationLength = stationLength;
    }

    @JsonProperty("StationWidth")
    public double getStationWidth() {
        return StationWidth;
    }

    public void setStationWidth(double stationWidth) {
        StationWidth = stationWidth;
    }

    @JsonProperty("StationHeight")
    public double getStationHeight() {
        return StationHeight;
    }

    public void setStationHeight(double stationHeight) {
        StationHeight = stationHeight;
    }

    @JsonProperty("StationVolNumber")
    public int getStationVolNumber() {
        return StationVolNumber;
    }

    public void setStationVolNumber(int stationVolNumber) {
        StationVolNumber = stationVolNumber;
    }






    @JsonProperty("StationTrayNumber")
    public int getStationTrayNumber() {
        return StationTrayNumber;
    }

    public void setStationTrayNumber(int stationTrayNumber) {
        StationTrayNumber = stationTrayNumber;
    }
}
